Skip to content

Bump minimum JDK distribution version needed for builds to 24 #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2025

Conversation

jatin-bhateja
Copy link
Contributor

@jatin-bhateja jatin-bhateja commented Aug 6, 2025

Updating minimum JDK build version to 24, it contains new two vector selectFrom API[1] which can be used to build wider lookup table[2] optimize StructuralIndexer and Utf8Validator. In addition I am also planning to optimize exsting ByteVector shuffling in Utf8Validator using Vector.slice API as per the proposal on panam-dev mailing list[3]

Following are JMH micro profiles with JDK24 and earlier version of JDK18.

Baseline (JDK18)


Benchmark                                                                                      (fileName)                                                                                                                                 (number)   Mode  Cnt         Score          Error  Units
NumberParserBenchmark.baseline                                                                        N/A                                                                                                                  2.2250738585072013e-308  thrpt    5   5473558.635 ±   338353.772  ops/s
NumberParserBenchmark.baseline                                                                        N/A  1.00000000000000188558920870223463870174566020691753515394643550663070558368373221972569761144603605635692374830246134201063722058e-309  thrpt    5   1183463.712 ±    51125.108  ops/s
NumberParserBenchmark.simdjson                                                                        N/A                                                                                                                  2.2250738585072013e-308  thrpt    5  30837396.358 ± 11754839.928  ops/s
NumberParserBenchmark.simdjson                                                                        N/A  1.00000000000000188558920870223463870174566020691753515394643550663070558368373221972569761144603605635692374830246134201063722058e-309  thrpt    5     45234.976 ±      833.718  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_fastjson                                   N/A                                                                                                                                      N/A  thrpt    5      1121.048 ±       33.214  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_jackson                                    N/A                                                                                                                                      N/A  thrpt    5      1060.286 ±       59.450  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjson                                   N/A                                                                                                                                      N/A  thrpt    5      2622.644 ±      344.999  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjsonPadded                             N/A                                                                                                                                      N/A  thrpt    5      2808.403 ±      197.083  ops/s
ParseBenchmark.simdjson                                                                     /twitter.json                                                                                                                                      N/A  thrpt    5      3001.930 ±      184.893  ops/s
ParseBenchmark.simdjson                                                                   /gsoc-2018.json                                                                                                                                      N/A  thrpt    5      1096.645 ±       48.914  ops/s
ParseBenchmark.simdjson                                                               /github_events.json                                                                                                                                      N/A  thrpt    5     32630.310 ±     2946.559  ops/s
ParseBenchmark.simdjsonPadded                                                               /twitter.json                                                                                                                                      N/A  thrpt    5      3108.940 ±      250.659  ops/s
ParseBenchmark.simdjsonPadded                                                             /gsoc-2018.json                                                                                                                                      N/A  thrpt    5      1190.478 ±       64.523  ops/s
ParseBenchmark.simdjsonPadded                                                         /github_events.json                                                                                                                                      N/A  thrpt    5     34470.156 ±     2420.467  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_fastjson                        N/A                                                                                                                                      N/A  thrpt    5      2119.262 ±      124.883  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_jackson                         N/A                                                                                                                                      N/A  thrpt    5      1257.988 ±       84.670  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_jsoniter_scala                  N/A                                                                                                                                      N/A  thrpt    5      2773.939 ±       99.052  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjson                        N/A                                                                                                                                      N/A  thrpt    5      4586.638 ±      418.604  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjsonPadded                  N/A                                                                                                                                      N/A  thrpt    5      4930.480 ±      268.188  ops/s
Utf8ValidatorBenchmark.guava                                                                /twitter.json                                                                                                                                      N/A  thrpt    5      5081.211 ±     3250.907  ops/s
Utf8ValidatorBenchmark.guava                                                              /gsoc-2018.json                                                                                                                                      N/A  thrpt    5      1878.982 ±       70.961  ops/s
Utf8ValidatorBenchmark.guava                                                          /github_events.json                                                                                                                                      N/A  thrpt    5     99130.635 ±     3412.302  ops/s
Utf8ValidatorBenchmark.utf8Validator                                                        /twitter.json                                                                                                                                      N/A  thrpt    5     49320.569 ±     2628.741  ops/s
Utf8ValidatorBenchmark.utf8Validator                                                      /gsoc-2018.json                                                                                                                                      N/A  thrpt    5     27395.248 ±     1142.811  ops/s
Utf8ValidatorBenchmark.utf8Validator                                                  /github_events.json                                                                                                                                      N/A  thrpt    5   1125927.034 ±    40865.723  ops/s

Latest (JDK24)

Benchmark                                                                                      (fileName)                                                                                                                                 (number)   Mode  Cnt         Score        Error  Units
NumberParserBenchmark.baseline                                                                        N/A                                                                                                                  2.2250738585072013e-308  thrpt    5   5462072.007 ± 278739.397  ops/s
NumberParserBenchmark.baseline                                                                        N/A  1.00000000000000188558920870223463870174566020691753515394643550663070558368373221972569761144603605635692374830246134201063722058e-309  thrpt    5   1168829.135 ± 107150.798  ops/s
NumberParserBenchmark.simdjson                                                                        N/A                                                                                                                  2.2250738585072013e-308  thrpt    5  38780690.519 ± 785018.339  ops/s
NumberParserBenchmark.simdjson                                                                        N/A  1.00000000000000188558920870223463870174566020691753515394643550663070558368373221972569761144603605635692374830246134201063722058e-309  thrpt    5     48820.483 ±   2091.110  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_fastjson                                   N/A                                                                                                                                      N/A  thrpt    5      1040.552 ±    102.172  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_jackson                                    N/A                                                                                                                                      N/A  thrpt    5      1023.520 ±     64.999  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjson                                   N/A                                                                                                                                      N/A  thrpt    5      2761.682 ±     57.840  ops/s
ParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjsonPadded                             N/A                                                                                                                                      N/A  thrpt    5      2876.464 ±    154.998  ops/s
ParseBenchmark.simdjson                                                                     /twitter.json                                                                                                                                      N/A  thrpt    5      3129.192 ±    176.681  ops/s
ParseBenchmark.simdjson                                                                   /gsoc-2018.json                                                                                                                                      N/A  thrpt    5       903.964 ±     95.023  ops/s
ParseBenchmark.simdjson                                                               /github_events.json                                                                                                                                                                                                                                            N/A  thrpt    5     32608.935 ±   5929.532  ops/s
ParseBenchmark.simdjsonPadded                                                               /twitter.json                                                                                                                                      N/A  thrpt    5      3264.151 ±    331.115  ops/s
ParseBenchmark.simdjsonPadded                                                             /gsoc-2018.json                                                                                                                                      N/A  thrpt    5       993.390 ±    444.361  ops/s
ParseBenchmark.simdjsonPadded                                                         /github_events.json                                                                                                                                      N/A  thrpt    5     35053.539 ±   1476.535  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_fastjson                        N/A                                                                                                                                      N/A  thrpt    5      1866.940 ±    180.445  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_jackson                         N/A                                                                                                                                      N/A  thrpt    5      1303.768 ±     62.788  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_jsoniter_scala                  N/A                                                                                                                                      N/A  thrpt    5      2788.672 ±     62.178  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjson                        N/A                                                                                                                                      N/A  thrpt    5      4668.444 ±    125.543  ops/s
SchemaBasedParseAndSelectBenchmark.countUniqueUsersWithDefaultProfile_simdjsonPadded                  N/A                                                                                                                                      N/A  thrpt    5      4960.229 ±    336.310  ops/s
Utf8ValidatorBenchmark.guava                                                                /twitter.json                                                                                                                                      N/A  thrpt    5      6070.296 ±    206.589  ops/s
Utf8ValidatorBenchmark.guava                                                              /gsoc-2018.json                                                                                                                                      N/A  thrpt    5      1841.022 ±    110.207  ops/s
Utf8ValidatorBenchmark.guava                                                          /github_events.json                                                                                                                                      N/A  thrpt    5     94730.361 ±   4001.621  ops/s
Utf8ValidatorBenchmark.utf8Validator                                                        /twitter.json                                                                                                                                      N/A  thrpt    5     61556.288 ±   3189.836  ops/s
Utf8ValidatorBenchmark.utf8Validator                                                      /gsoc-2018.json                                                                                                                                      N/A  thrpt    5     26356.486 ±   2664.592  ops/s
Utf8ValidatorBenchmark.utf8Validator                                                  /github_events.json                                                                                                                                      N/A  thrpt    5   1131609.333 ±  62957.176  ops/s

All existing tests are passing after upgrade.

Kindly review and approve.

Best Regards,
Jatin

[1] https://tinyurl.com/2w9557us
[2] ionutbalosin/jvm-performance-benchmarks#105
[3] https://mail.openjdk.org/pipermail/panama-dev/2025-August/021095.html

@jatin-bhateja jatin-bhateja marked this pull request as ready for review August 6, 2025 14:54
@jatin-bhateja jatin-bhateja changed the title Bump minimum JDK distribution needed for builds to 24 Bump minimum JDK distribution version needed for builds to 24 Aug 6, 2025
@piotrrzysko
Copy link
Member

Thank you! I’ll try to review your PRs within the next couple of days.

@jatin-bhateja
Copy link
Contributor Author

Hi @piotrrzysko , Let me know if this needs any modifications.

@piotrrzysko
Copy link
Member

Hi, I remember your PRs. I just need a bit more time.

@@ -33,9 +33,9 @@ java {
// It seems that specifying the minimum supported Java version while allowing the use of newer
// ones isn't possible in Gradle. To test the library against multiple Java versions, the
// workaround proposed in https://github.com/gradle/gradle/issues/16256 has been applied:
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_18)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@jatin-bhateja jatin-bhateja Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the latest JDK-24, some of the VectorOperators have been renamed, breaking backward compatibility.
Do you see any value in continuing to run CI jobs with older distributions before version 24?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop support for older versions.

@piotrrzysko piotrrzysko merged commit b6cab55 into simdjson:main Aug 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants